<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./lib/vue-2.4.0.js"></script>
    <style>
        .red {
            color: rebeccapurple;
        }
        
        .thin {
            font-size: 50px;
        }
        
        .active {
            letter-spacing: 0.5em;
            color: aqua;
        }
    </style>
</head>

<body>
    <div id="app">
        <div :class="[red,thin, flag?'active':'']">考试成绩</div>
        <div :class="[red,thin, {'active':flag}]">考试成绩</div>

        <div :style="[style, active]">考试成绩</div>
    </div>

    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                red: "red",
                thin: "thin",
                flag: true,
                active: {
                    color: 'aqua'
                },
                style: {
                    // color: 'aqua',
                    'font-size': '100px'
                }
            },
            methods: {}
        });
    </script>
</body>

</html>